/**************************************************************************
 *
 * Copyright (C) 2007 University of California, Los Angeles.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 *************************************************************************/

package edu.ucla.cs.typecast.app.auction;

import java.io.*;

/**
 * An event indicating that a buyer bids on the given item for the given price.
 */

public class AuctionBidEvent implements Serializable {
	/**
	 * Serial number for serialization.
	 */

	private static final long serialVersionUID = 1L;
	
	/**
	 * The item to be bid on.
	 */

	protected ItemInfo itemInfo;
	
	/**
	 * Bidder's info.
	 */

	protected ParticipantInfo buyerInfo;
	
	/**
	 * The bidding price
	 */

	protected int price;

	public AuctionBidEvent(ItemInfo itemInfo, ParticipantInfo buyerInfo,
			int price) {
		super();
		this.itemInfo = itemInfo;
		this.buyerInfo = buyerInfo;
		this.price = price;
	}

	public ParticipantInfo getBuyerInfo() {
		return buyerInfo;
	}

	public ItemInfo getItemInfo() {
		return itemInfo;
	}

	public int getPrice() {
		return price;
	}

	public void setBuyerInfo(ParticipantInfo buyerInfo) {
		this.buyerInfo = buyerInfo;
	}

	public void setItemInfo(ItemInfo itemInfo) {
		this.itemInfo = itemInfo;
	}

	public void setPrice(int price) {
		this.price = price;
	}

}
